<?php

/**
 * 数据库配置文件
 * panglishan
 * 2020.07.28
 */

return [

    'default' => env('DB_CONNECTION', 'mysql'),

    'connections' => [
        //主库
        'mysql' => [
            'driver' => 'mysql',
            'host' => env('DB_HOST'),
            'port' => env('DB_PORT', 3306),
            'database' => env('DB_DATABASE'),
            'username' => env('DB_USERNAME'),
            'password' => env('DB_PASSWORD'),
            'charset' => env('DB_CHARSET', 'utf8mb4'),
            'strict' => false,
        ],
        'mysql_game' => [
            'driver' => 'mysql',
            'host' => env('DB_HOST'),
            'port' => env('DB_PORT', 3306),
            'database' => env('DB_DATABASE_GAME', 'game'),
            'username' => env('DB_USERNAME'),
            'password' => env('DB_PASSWORD'),
            'charset' => env('DB_CHARSET', 'utf8mb4'),
            'strict' => false,
        ],
    ],

    //redis配置
    'redis' => [
        'client' => 'predis',
        'options' => [
            'prefix' => ''
        ],
        'default' => [
            'host' => env('REDIS_HOST'),
            'password' => env('REDIS_PASSWORD'),
            'port' => env('REDIS_PORT', 6379),
            'database' => env('REDIS_DATABASE', 10),
        ],
        'game' => [
            'host' => env('GAME_REDIS_HOST'),
            'password' => env('GAME_REDIS_PASSWORD'),
            'port' => env('GAME_REDIS_PORT', 6379),
            'database' => env('GAME_REDIS_DATABASE', 11),
        ],
        'game2' => [
            'host' => env('GAME_REDIS_HOST'),
            'password' => env('GAME_REDIS_PASSWORD'),
            'port' => env('GAME_REDIS_PORT', 6379),
            'database' => env('GAME2_REDIS_DATABASE', 18),
        ],
        'invite' => [
            'host' => env('REDIS_HOST'),
            'password' => env('REDIS_PASSWORD'),
            'port' => env('GAME_REDIS_PORT', 6379),
            'database' => 19,
        ],
        'ktv' => [
            'host' => env('REDIS_HOST'),
            'password' => env('REDIS_PASSWORD'),
            'port' => env('REDIS_PORT', 6379),
            'database' => 0,
        ],
        'activity' => [
            'host' => env('REDIS_HOST'),
            'password' => env('REDIS_PASSWORD'),
            'port' => env('REDIS_PORT', 6379),
            'database' => env('ACTIVITY_REDIS_DATABASE', 3),
        ]
    ],

    'migrations' => 'migrations',
];
